home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr52
/
5333de.zip
/
6.PRG
< prev
next >
Wrap
Text File
|
1993-04-03
|
922b
|
38 lines
// Update the client files CA of the Pears
// This variation takes APPEND out of the loop.
// and it takes the CA.dbf out completely.
// and changes all the private variables to local
// and avoids multiple file re-opens.
local I
clear
use IDS NEW
FOR I = 1 TO 6000
X = NEW_ID("CA")
? "REC#"+str(I,4)+" "
?? "string= "+str(memory(0),4)+"K "+;
"free = "+str(memory(1),4)+"K "+;
"run = "+str(memory(2),4)+"K "+;
"EMM = "+str(memory(3),4)+"K "
next
use
return
Function NEW_ID(P1)
***************************************
*
***************************************
local R,; && returns the latest ID
W,; && saves the previous workarea chosen
D
locate for DS == PadR(P1, 8)
if found()
D = val(NEWID)+1
R := PadL( D, len(trim(NEWID)), "0")
replace NEWID with R
endif
return R